<template>
  <el-breadcrumb separator="/">
    <template v-for="item in breadcrumb" :key="item.name">
      <el-breadcrumb-item>{{ item.name }}</el-breadcrumb-item>
    </template>
  </el-breadcrumb>
</template>

<script lang="ts">
import { defineComponent, type PropType } from "vue"
import type { IBreadcrumb } from "../types"

export default defineComponent({
  props: {
    breadcrumb: {
      type: Array as PropType<IBreadcrumb[]>,
      default: () => [
        {
          name: "首页"
        }
      ]
    }
  },
  components: {},
  setup() {
    return {}
  }
})
</script>

<style scoped lang="less"></style>
